package com.wgj.android.tools;

import android.content.Context;
import android.util.AttributeSet;

import org.greenrobot.eventbus.EventBus;

import java.util.Timer;
import java.util.TimerTask;

import cn.jzvd.JZVideoPlayerStandard;

/**
 * Created by Administrator on 2018/2/2.
 */

public class MyJZVideoPlayerStandard extends JZVideoPlayerStandard {

    private  OnPlayCallback onPlayCallback;
    public MyJZVideoPlayerStandard(Context context) {
        super(context);
    }

    public MyJZVideoPlayerStandard(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void init(Context context) {
        super.init(context);
    }

    @Override
    public void startVideo() {
        super.startVideo();
    }
    @Override
    public void onStatePreparing() {
        super.onStatePreparing();

    }



    public  void setOnPlayCallback(OnPlayCallback onPlayCallback) {
        this.onPlayCallback = onPlayCallback;
    }

    @Override
    public void onStatePlaying() {
        super.onStatePlaying();
        if(onPlayCallback!=null){
             onPlayCallback.onStart();
        }
    }


   public  static interface  OnPlayCallback{
        public  void  onStart();
    }

}
